﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace DungeonGenerator
{
    public static class WindowsBaseExtensions
    {
        public static bool ContainsExclusive(this Rect rect, PointI point)
        {
            var comparer = rect.Deflate();
            return comparer.Contains(point.X, point.Y);
        }

        public static Rect Deflate(this Rect r)
        {
            return new Rect(r.X + 1, r.Y + 1, r.Width - 2, r.Height - 2);
        }
    }
}
